1. Field of the Invention
The present invention relates to an image processing method for calculating run length to be applied as characteristic quantity for identifying a pixel in each area in an image, a program for making a computer run the image processing method and a recording medium recording the program, and an image processing apparatus calculating the run length and an image forming apparatus provided with the image processing apparatus.
2. Description of the Related Art
Image forming apparatuses such as a digital copying apparatus and a facsimile apparatus or the like apply image processing to read image data of an input image for improving quality of the image formed on a recording sheet. As this image processing, there is a method by which run length is calculated and image processing is performed with use of the run length (for instance, see Mitsuo Kaji, “Print Image Engineering For Print and Electric Engineers”, First Edition, Insatsugakkai Shuppanbu, Jun. 15, 1988, p 269-278).
FIG. 10 is a view showing a pixel block 2 from which run length is calculated as an example. FIG. 11 is a view showing a direction in which the run length is traced on the basis of definition of the run length for the pixel block 2 shown in FIG. 10. To calculate the run length, first an input image 1 is divided into the pixel block 2 consisting of a plurality of pixels as shown in FIG. 10 and each pixel of the pixel block 2 is classified by a density value of the pixel. Next a pixel with a certain density value is defined as an interest pixel and a pixel which has the same density value as the interest pixel and is spatially continuing with the interest pixel, is traced. Thus, a number of pixels spatially continuing with the interest pixel is calculated as run length.
Tracing pixels being spatially continuing is made in eight directions which are directed from the interest pixel to each peripheral pixel as shown by arrow marks in FIG. 11. Peripheral pixels having the same density value as the interest pixel 6 are traced in each of the eight directions and moreover the traced peripheral pixel is defined as a new interest pixel and a peripheral pixel having the same density value as the new interest pixel is traced in each of the eight directions. A pixel tracing route drawn from the first interest pixel defined as a starting point becomes a straight line or a curved line as shown in FIG. 10.
According to image processing method as shown in FIGS. 10 and 11, since eight tracing directions is always assumed as shown in FIG. 11, a number of patterns of pixel tracing route in the pixel block 2 becomes enormous number. In addition, since the peripheral pixel 7 having the same density as the interest pixel 6 is not limited to only one, there is possibility that the tracing route will diverge on the way and the tracing route will become complicated.
Thus, in a method of calculating run length, the scale of a circuit for calculating the run length becomes large and therefore there is a problem that the circuit cannot be realized as hardware. This is because the circuit corresponding to the assumed pixel tracing route should be provided for calculating the run length and the scale of the circuit is proportion to the number of patterns of the tracing route. Therefore, when a vast tracing route is assumed, the scale of the circuit becomes large and it is impossible that the circuit is realized as hardware.
In addition, since the scale and processing amount of software for calculating the run length becomes vast, the speed of processing becomes very low. Consequently, since processing corresponding to the assumed pixel tracing route should be provided for calculating the run length and the scale of the processing is proportion to the number of patterns of the tracing route, the scale of the processing becomes large and the processing requires much time when the vast tracing route is assumed.